
//首页的仓库
import {reqGetBannerList} from "@/api"

const state={
    //获取列表中的banner图
    bannerList:[]
}
const mutations={
    updateBannerList(state,newBannerList){
        state.bannerList=newBannerList
        console.log(`state.bannerList`+state.bannerList);
        
    }
}
const actions={
    async setBannerList(context){
        const result=await reqGetBannerList()
        //console.log(result.data);
        
        context.commit('updateBannerList',result.data)
    }
}
const getters={}
export default{
    namespaced:true,
    state,
    mutations,
    actions,
    getters
}